<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<?php
$channel_link = "http://".Yii::app()->request->serverName."/".$channel->name;
$embled_code = "<script>var width = 600; var height = 430; var channel = '{$channel->name}';  var src = 'http://".Yii::app()->request->serverName."/site/emdbed?w=600&h=430&c={$channel->name}';</script>";
$embled_code.= "<script src='http://".Yii::app()->request->serverName."".baseTheme()."/js/_embedplayer.js'></script>";


?>

<div align="center" style="width:100% !important; height:auto;"> 
  <div class="topbar" align="center">
			   <legend align="center" style="border-bottom:none; width:auto; font-family:Tahoma, Geneva, sans-serif;line-height:34px;  ">
				Channel: <?php echo $channel->name;?></legend>
			 </div>
        <div class="content3" align="center">
                <div class="embbedplayer" align="center">
				<script>
				var width = 600;
				var height = 430;
				var channel = "<?php echo $channel->name;?>";
				var src = "http://<?php echo Yii::app()->request->serverName;?>/site/emdbed?w="+width+"&h="+height+"&c=<?php echo $channel->name;?>";
				</script>
				<script src="<?php echo baseTheme();?>/js/_embedplayer.js"></script>
				

				
				
                </div>
				
				
        	<div class="imageg2" align="center">
                </div>
                <div class="playerdetails1 playerdetails1c" align="center">
						<div class="texts1" align="center" style="font-family:Tahoma, Geneva, sans-serif; ">
							<label>
								<strong>Video size</strong>
							</label>
							<div>
										
								<input type="radio" onclick="changeWidthHeight(600, 420)" name="size">
								600x420
								<input type="radio" onclick="changeWidthHeight(600, 430)" name="size" checked>
								600x430
							</div>
						</div>
                       <div class="texts1" align="center" style="font-family:Tahoma, Geneva, sans-serif; ">
							<label>
								<strong>Embed Code</strong>
							</label>
							<div>
								<textarea class="embedcode1" name="temp" size="" value="" id="embled_code" ><?php echo $embled_code;?></textarea>
							</div>
						</div>
						<div class="texts1" align="center" style="font-family:Tahoma, Geneva, sans-serif; ">
							<label>
								<strong>Link</strong>
							</label>
							<div>
								<textarea class="embedcode1" name="temp" size="" value=""><?php echo $channel_link;?></textarea>
							</div>
						</div>
               
                    
                </div>
                 
        </div>
      <div class="clear"></div>   
          
</div>
<script>
function changeWidthHeight(w,h){
	var html = '<script> var width = '+w+'; ';
	html+= 'var height = '+h+';';
	html+= 'var channel = "<?php echo $channel->name;?>";';
	html+= 'var src = "http://<?php echo Yii::app()->request->serverName;?>/site/emdbed?w='+width+'&h='+height+'&c=<?php echo $channel->name;?>";';
	html+= ' <\/script>';
	$("#embled_code").val(html);
}
</script>